public class test{
    public static void main(String[] args)
    {
        //递归求阶乘
        int n = 10;
        System.out.println("10!=" + Factorial(n));
    }

    static long Factorial(int n){
        if (n==1)
        {
            return 1;
        }
        else{
            return n*Factorial(n-1);
        }
    }
}